<?php  
//config database
  	add_action('init', 'db_mygallerys');
	function db_mygallerys()
	{	
		global $wpdb;
		$gallery 		= $wpdb->prefix . "gallerys";
				
		if ($wpdb->get_var("SHOW TABLES LIKE '$gallery'") != $gallery)
		{
			$wpdb->query("CREATE TABLE {$gallery}
			(			
				ID  mediumint(10) AUTO_INCREMENT PRIMARY KEY ,
				title 			VARCHAR(250) NULL,
				url		 		VARCHAR(250) NULL,
				parent			INT NULL,
				type			INT NULL,
				date	 		DATETIME							
			)ENGINE=MyISAM DEFAULT CHARSET=utf8");
		}	
		
	}

  add_action('admin_menu', 'myconfig_admins_gallery');
  function myconfig_admins_gallery()
  {   
     add_menu_page( 'My Gallery', 'My Gallery', 'administrator', 'my-setting-gallery', 'my_theme_setting_gallery');
  }  
  function my_theme_setting_gallery()
  {  			
    ?>		 
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
	<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />	
	<title>Order Detail</title>	
	<link href="<?php bloginfo('template_url');?>/admins/css/style.css" rel="stylesheet" type="text/css" />
	<link href="<?php bloginfo('template_url');?>/photos/css.css" rel="stylesheet" type="text/css" />
	
	<link href="<?php bloginfo('template_url');?>/admins/css/tabcontent.css" rel="stylesheet" type="text/css" />
	<script src="<?php bloginfo('template_url');?>/admins/js/tabcontent.js" 			type="text/javascript" ></script>  
			
	</head>	
	<body>			
			<div id="my_theme_options_content" style="width: 98%;">
                <!-- Tab choosen -->
		           <ul id="countrytabs_admin" class="shadetabs">          
		           	 	<li><a href="#" rel="mySetting_company_info">Upload multiple photos</a></li>	           	 	
                                          
                    </ul>
                 <!-- End Tab choosen -->   
                    <div class="box-tabs">                    
                    <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
                       
                       <!-- ++++++++++++++++ Cập nhật tùy chỉnh trang company branches ++++++++++++++++++ -->
                        <div id="mySetting_company_info" class="tabcontent"> 
    			          	<?php include TEMPLATEPATH.'/photos/views/multiple-upload.php';?>
    	           		</div>
	           		   <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
	           		                             
                     <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->	                    
	           		 </div>
		             <script type="text/javascript">
						var countries=new ddtabcontent("countrytabs_admin")
						countries.setpersist(true)
						countries.setselectedClassTarget("link") 
						countries.init()
					</script>						             
    	</div>
    	</body>
	</html>
    <?php
  }

